package com.etc.entity;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class Human implements InitializingBean,DisposableBean,BeanFactoryAware,BeanNameAware{

	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
		System.out.println("********Human对象的属性name进行赋值动作*************");
	}
	
	public Human() {
		// TODO Auto-generated constructor stub
		System.out.println("********构造Human对象*************");
	}

	public void init() {
		// TODO Auto-generated constructor stub
		System.out.println("********Human中的init方法*************");
	}
	public void destory() {
		// TODO Auto-generated constructor stub
		System.out.println("********Human对象中的destory方法*************");
	}
	
	@Override
	public void afterPropertiesSet() throws Exception {
		// TODO Auto-generated method stub
		System.out.println("********Human对象的属性赋值动作结束(after)*************");
		
	}
	
	@Override
	public void destroy() throws Exception {
		// TODO Auto-generated method stub
		System.out.println("********Human对象中的destory方法,重写DisposableBean中的方法*************");
		
	}
	
	@Override
	public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
		// TODO Auto-generated method stub
		System.out.println("********Human对象中的setBeanFactory方法,beanFactory*************"+beanFactory);
		
	}
	
	@Override
	public void setBeanName(String name) {
		// TODO Auto-generated method stub
		System.out.println("********Human对象中的setBeanName方法,name*************"+name);
	}
}
